package queueddas;

import java.awt.*;
import javax.swing.*;

public class Server{

    private int dx;
    private int dy;
    private int x;
    private int y;
    private Image image;

    public Server(){
        ImageIcon ii = new ImageIcon("server.gif");
        image = ii.getImage();
        x = 830;
        y = 200;
    }

    public int getX(){
        return x;
    }

    public int getY(){
        return y;
    }

    public void setXY(int x, int y){
            this.x = x;
            this.y = y;
    }

    public Image getImage() {
        return image;
    }
}

/*
package queueddas;

import java.awt.*;
import javax.swing.*;

public class Server{

    private int dx;
    private int dy;
    private int x;
    private int y;
    private Image image;

    public Server(){
        ImageIcon ii = new ImageIcon("server.gif");
        image = ii.getImage();
        x = 830;
        y = 200;
    }

    public int getX(){
        return x;
    }

    public int getY(){
        return y;
    }

    public void animation(int x, int y){
        while(this.x != x && this.y != y){
            this.x += 1; this.y += 1;

            if(this.x >= x)
                this.x = x;
            if(this.y >= y)
                this.y = y;
             try {
                Thread.sleep(5);
                } catch (InterruptedException e) {
                System.out.println("interrupted");
                }
       }
    }
    public void setXY(int x, int y){
            animation(x, y);
    }

    public Image getImage() {
        return image;
    }
}
*/